package com.clss.commandhelper.tools.eventbus;

/**
 * EventBus传递通知的封装类
 * Created by LiuV on 2017/6/13.
 */

public class EventBusMessage {
    int code;
    String message;
    long time = -1;
    int type = -1;

    public EventBusMessage(int code) {
        this(code, "");
    }

    public EventBusMessage(String msg) {
        this(-1, msg);
    }

    public EventBusMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public EventBusMessage(int code, String message, long time, int type) {
        this.code = code;
        this.message = message;
        this.time = time;
        this.type = type;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public long getTime() {
        return time;
    }

    public int getType() {
        return type;
    }

    @Override
    public String toString() {
        return "EventBusMessage{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
